x86: use optimal NOPs to fill the SMEP/SMAP placeholders
authorJan Beulich <jbeulich@suse.com>
Fri, 13 May 2016 17:13:54 +0000 (18:13 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 13 May 2016 17:15:55 +0000 (18:15 +0100)
commit01a0bd0a7d72be638a359db3f8cf551123467d29
tree65d53d183b2579fb663f2fe65d17e99bfeff7fe9
parentea3e8edfdbabfb17f0d39ed128716ec464f348b8
x86: use optimal NOPs to fill the SMEP/SMAP placeholders

Alternatives patching code picks the most suitable NOPs for the
running system, so simply use it to replace the pre-populated ones.

Use an arbitrary, always available feature to key off from, but
hide this behind the new X86_FEATURE_ALWAYS.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/x86_64/compat/entry.S
xen/include/asm-x86/asm_defns.h
xen/include/asm-x86/cpufeature.h